/*
 *    Copyright (c) 2023 李伟国
 *    moyu is licensed under Mulan PSL v2.
 *    You can use this software according to the terms and conditions of the Mulan PSL v2.
 *    You may obtain a copy of Mulan PSL v2 at:
 *             http://license.coscl.org.cn/MulanPSL2
 *    THIS SOFTWARE IS PROVIDED ON AN "AS IS" BASIS, WITHOUT WARRANTIES OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO NON-INFRINGEMENT, MERCHANTABILITY OR FIT FOR A PARTICULAR PURPOSE.
 *    See the Mulan PSL v2 for more details.
 */

package cn.moyu.service.impl;

import cn.moyu.entity.KettleTransParameters;
import cn.moyu.mapper.KettleTransParametersMapper;
import cn.moyu.service.IKettleTransParametersService;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * kettle参数
 */

@Service
public class KettleTransParametersServiceImpl extends ServiceImpl<KettleTransParametersMapper, KettleTransParameters> implements IKettleTransParametersService {

    /**
     * 通过transId查找对应的参数信息
     *
     * @param transId trans_info的id
     * @return 结果
     */
    @Override
    public List<KettleTransParameters> getListByTransId(Long transId) {
        LambdaQueryWrapper<KettleTransParameters> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(KettleTransParameters::getTransId, transId);
        return this.baseMapper.selectList(queryWrapper);
    }
}
